----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  D:\Vicard\VV\re\inprogress\BRV\results\Figure2.log
  log type:  text
 opened on:  29 Sep 2017, 18:03:57

. 
. 
. /// Without FE: Figure 2a
> 
. use "$Output\dataset_brv_fe", clear

. tab age_ele1, gen(aged)

       Age$ |
   _{ijkt}$ |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |  2,735,188       38.66       38.66
          2 |  1,128,474       15.95       54.61
          3 |    872,423       12.33       66.94
          4 |    613,930        8.68       75.61
          5 |    448,352        6.34       81.95
          6 |    340,770        4.82       86.77
          7 |    263,962        3.73       90.50
          8 |    204,436        2.89       93.39
          9 |    161,307        2.28       95.67
         10 |    127,147        1.80       97.46
         11 |    100,840        1.43       98.89
         12 |     78,548        1.11      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. replace aged10 = 1 if age_ele1>=10
(179,388 real changes made)

. drop aged11

. tab year, gen(yeard)

       Year |      Freq.     Percent        Cum.
------------+-----------------------------------
       1996 |    578,661        8.18        8.18
       1997 |    657,228        9.29       17.47
       1998 |    682,850        9.65       27.12
       1999 |    699,799        9.89       37.01
       2000 |    727,678       10.28       47.29
       2001 |    732,521       10.35       57.65
       2002 |    743,846       10.51       68.16
       2003 |    732,782       10.36       78.52
       2004 |    754,590       10.67       89.18
       2005 |    765,422       10.82      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. *
. global condition     "entry_ele!=1994 & entry_ele!=1995 "

. *
. eststo: reg res_fe_qty                  aged2-aged10     if $condition, ro cluster(i)

Linear regression                               Number of obs     =  4,382,989
                                                F(9, 77075)       =    1225.20
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0189
                                                Root MSE          =     1.2493

                                 (Std. Err. adjusted for 77,076 clusters in i)
------------------------------------------------------------------------------
             |               Robust
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |   .1918845   .0021771    88.14   0.000     .1876174    .1961517
       aged3 |   .2972234   .0033607    88.44   0.000     .2906364    .3038104
       aged4 |   .3782709   .0044231    85.52   0.000     .3696016    .3869401
       aged5 |   .4328243       .005    86.56   0.000     .4230244    .4426243
       aged6 |   .4768926   .0061122    78.02   0.000     .4649127    .4888726
       aged7 |   .5260731   .0077431    67.94   0.000     .5108966    .5412495
       aged8 |   .5559608   .0098915    56.21   0.000     .5365735    .5753482
       aged9 |   .5928039   .0135749    43.67   0.000     .5661971    .6194107
      aged10 |    .614269   .0164741    37.29   0.000     .5819798    .6465581
       _cons |  -.2331431   .0028736   -81.13   0.000    -.2387754   -.2275109
------------------------------------------------------------------------------
(est1 stored)

. forvalues x=2(1)10{
  2.         lincom aged`x'
  3.         g beta_age_q_`x' = r(estimate)
  4.         g se_age_q_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1918845   .0021771    88.14   0.000     .1876174    .1961517
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2972234   .0033607    88.44   0.000     .2906364    .3038104
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .3782709   .0044231    85.52   0.000     .3696016    .3869401
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .4328243       .005    86.56   0.000     .4230244    .4426243
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .4768926   .0061122    78.02   0.000     .4649127    .4888726
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5260731   .0077431    67.94   0.000     .5108966    .5412495
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5559608   .0098915    56.21   0.000     .5365735    .5753482
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5928039   .0135749    43.67   0.000     .5661971    .6194107
------------------------------------------------------------------------------

 ( 1)  aged10 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |    .614269   .0164741    37.29   0.000     .5819798    .6465581
------------------------------------------------------------------------------

. eststo: reg res_fe_uv_nojkt     aged2-aged10     if $condition  & e(sample), ro cluster(i)

Linear regression                               Number of obs     =  4,382,989
                                                F(9, 77075)       =      88.10
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0010
                                                Root MSE          =     .68595

                                 (Std. Err. adjusted for 77,076 clusters in i)
------------------------------------------------------------------------------
             |               Robust
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |  -.0271967    .001066   -25.51   0.000     -.029286   -.0251073
       aged3 |  -.0394545   .0018215   -21.66   0.000    -.0430246   -.0358844
       aged4 |  -.0502507   .0022106   -22.73   0.000    -.0545834   -.0459179
       aged5 |  -.0534576   .0025898   -20.64   0.000    -.0585335   -.0483817
       aged6 |  -.0575026   .0033849   -16.99   0.000     -.064137   -.0508682
       aged7 |  -.0652372   .0042317   -15.42   0.000    -.0735314    -.056943
       aged8 |  -.0641019   .0059638   -10.75   0.000    -.0757909   -.0524128
       aged9 |  -.0773915   .0125274    -6.18   0.000    -.1019451   -.0528379
      aged10 |  -.0698879   .0063614   -10.99   0.000    -.0823562   -.0574197
       _cons |   .0256582   .0010761    23.84   0.000      .023549    .0277673
------------------------------------------------------------------------------
(est2 stored)

. forvalues x=2(1)10{
  2.         lincom aged`x'
  3.         g beta_age_p_`x' = r(estimate)
  4.         g se_age_p_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0271967    .001066   -25.51   0.000     -.029286   -.0251073
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0394545   .0018215   -21.66   0.000    -.0430246   -.0358844
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0502507   .0022106   -22.73   0.000    -.0545834   -.0459179
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0534576   .0025898   -20.64   0.000    -.0585335   -.0483817
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0575026   .0033849   -16.99   0.000     -.064137   -.0508682
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0652372   .0042317   -15.42   0.000    -.0735314    -.056943
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0641019   .0059638   -10.75   0.000    -.0757909   -.0524128
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0773915   .0125274    -6.18   0.000    -.1019451   -.0528379
------------------------------------------------------------------------------

 ( 1)  aged10 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0698879   .0063614   -10.99   0.000    -.0823562   -.0574197
------------------------------------------------------------------------------

. forvalues x=1(1)1{
  2.         g beta_age_p_`x' = 0
  3.         g beta_age_q_`x' = 0
  4.         g se_age_p_`x'   = 0
  5.         g se_age_q_`x'   = 0 
  6. }

. 
. keep if _n == 1
(7,075,376 observations deleted)

. 
. collapse (max) beta_age_* se_age_*, by(age_ele1)

. 
. g obs = 1

. reshape long beta_age_q_ beta_age_p_ se_age_q_ se_age_p_, i(obs) j(experience)
(note: j = 1 2 3 4 5 6 7 8 9 10)

Data                               wide   ->   long
-----------------------------------------------------------------------------
Number of obs.                        1   ->      10
Number of variables                  42   ->       7
j variable (10 values)                    ->   experience
xij variables:
beta_age_q_1 beta_age_q_2 ... beta_age_q_10->  beta_age_q_
beta_age_p_1 beta_age_p_2 ... beta_age_p_10->  beta_age_p_
  se_age_q_1 se_age_q_2 ... se_age_q_10   ->   se_age_q_
  se_age_p_1 se_age_p_2 ... se_age_p_10   ->   se_age_p_
-----------------------------------------------------------------------------

. drop age_ele1

. rename  beta_age_q_ beta_age_q

. rename  beta_age_p_  beta_age_p

. rename  se_age_q_   se_age_q

. rename  se_age_p_  se_age_p

. *
. g zero = 0

. local zero = 0 

. *
. global bandwidth = 0.66

. gen beta_bench = 0

. local beta_bench = beta_bench

. 
. g beta_age_q_min = beta_age_q-1.96*se_age_q

. g beta_age_q_max = beta_age_q+1.96*se_age_q

. g beta_age_p_min = beta_age_p-1.96*se_age_p

. g beta_age_p_max = beta_age_p+1.96*se_age_p

.                                 
. label define experience 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" 10 "10"

. label values experience experience

. label list
experience:
           2 2
           3 3
           4 4
           5 5
           6 6
           7 7
           8 8
           9 9
          10 10

. label var beta_age_q "quantities"

. label var beta_age_p "prices"

. *
. twoway scatter beta_age_q experience,  lwidth(thin) c(l) lpattern(dash) sort  xlabel(1 2 3 4 5 6 7 8 9 10,  valuelabel) ylabel(-0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8)  ///
> || scatter beta_age_p experience,   lwidth(thin) lpattern(solid) c(l) xtitle("# years since last entry") ///
> || line beta_bench experience, color(gs5) ///
> legend(on order(1 2)) bgcolor(white) graphregion(color(white)) ysize(2) xsize(2) ysc(r(-0.2 0.8))

. graph export "$results\Figure2a.eps", as(eps) replace
(note: file results\Figure2a.eps not found)
(file results\Figure2a.eps written in EPS format)

. 
. eststo clear

. 
. /// With FE: Figure 2b
> 
. use "$Output\dataset_brv_fe", clear

. tab age_ele1, gen(aged)

       Age$ |
   _{ijkt}$ |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |  2,735,188       38.66       38.66
          2 |  1,128,474       15.95       54.61
          3 |    872,423       12.33       66.94
          4 |    613,930        8.68       75.61
          5 |    448,352        6.34       81.95
          6 |    340,770        4.82       86.77
          7 |    263,962        3.73       90.50
          8 |    204,436        2.89       93.39
          9 |    161,307        2.28       95.67
         10 |    127,147        1.80       97.46
         11 |    100,840        1.43       98.89
         12 |     78,548        1.11      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. replace aged10 = 1 if age_ele1>=10
(179,388 real changes made)

. drop aged11

. tab year, gen(yeard)

       Year |      Freq.     Percent        Cum.
------------+-----------------------------------
       1996 |    578,661        8.18        8.18
       1997 |    657,228        9.29       17.47
       1998 |    682,850        9.65       27.12
       1999 |    699,799        9.89       37.01
       2000 |    727,678       10.28       47.29
       2001 |    732,521       10.35       57.65
       2002 |    743,846       10.51       68.16
       2003 |    732,782       10.36       78.52
       2004 |    754,590       10.67       89.18
       2005 |    765,422       10.82      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. *
. global condition     "entry_ele!=1994 & entry_ele!=1995 "

. *
. eststo: areg res_fe_qty                 aged2-aged10     if $condition , a(ijk) cluster(i)

Linear regression, absorbing indicators         Number of obs     =  4,382,989
                                                F(   9,  77075)   =     358.77
                                                Prob > F          =     0.0000
                                                R-squared         =     0.6925
                                                Adj R-squared     =     0.4148
                                                Root MSE          =     0.9648

                                 (Std. Err. adjusted for 77,076 clusters in i)
------------------------------------------------------------------------------
             |               Robust
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |   .1498455    .002773    54.04   0.000     .1444105    .1552805
       aged3 |   .1925802    .004116    46.79   0.000     .1845129    .2006476
       aged4 |   .2124309   .0052124    40.75   0.000     .2022146    .2226472
       aged5 |    .218877   .0067281    32.53   0.000     .2056899    .2320642
       aged6 |   .2192787   .0085287    25.71   0.000     .2025626    .2359949
       aged7 |   .2213683   .0106211    20.84   0.000      .200551    .2421856
       aged8 |   .2188059   .0127837    17.12   0.000       .19375    .2438618
       aged9 |   .2213808   .0176843    12.52   0.000     .1867197    .2560419
      aged10 |   .2102892   .0186996    11.25   0.000     .1736381    .2469403
       _cons |  -.1755846   .0017894   -98.13   0.000    -.1790918   -.1720774
-------------+----------------------------------------------------------------
         ijk |   absorbed                                 (2080034 categories)
(est1 stored)

. forvalues x=2(1)10{
  2.         lincom aged`x'
  3.         g beta_age_q_`x' = r(estimate)
  4.         g se_age_q_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1498455    .002773    54.04   0.000     .1444105    .1552805
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .1925802    .004116    46.79   0.000     .1845129    .2006476
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2124309   .0052124    40.75   0.000     .2022146    .2226472
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |    .218877   .0067281    32.53   0.000     .2056899    .2320642
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2192787   .0085287    25.71   0.000     .2025626    .2359949
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2213683   .0106211    20.84   0.000      .200551    .2421856
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2188059   .0127837    17.12   0.000       .19375    .2438618
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2213808   .0176843    12.52   0.000     .1867197    .2560419
------------------------------------------------------------------------------

 ( 1)  aged10 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .2102892   .0186996    11.25   0.000     .1736381    .2469403
------------------------------------------------------------------------------

. eststo: areg res_fe_uv_nojkt    aged2-aged10     if $condition  & e(sample), a(ijk) cluster(i)

Linear regression, absorbing indicators         Number of obs     =  4,382,989
                                                F(   9,  77075)   =       5.47
                                                Prob > F          =     0.0000
                                                R-squared         =     0.6732
                                                Adj R-squared     =     0.3780
                                                Root MSE          =     0.5413

                                 (Std. Err. adjusted for 77,076 clusters in i)
------------------------------------------------------------------------------
             |               Robust
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |  -.0082172   .0013312    -6.17   0.000    -.0108263   -.0056081
       aged3 |  -.0113505   .0020913    -5.43   0.000    -.0154494   -.0072517
       aged4 |  -.0142459   .0024273    -5.87   0.000    -.0190034   -.0094884
       aged5 |  -.0135284   .0028723    -4.71   0.000    -.0191582   -.0078986
       aged6 |  -.0139582   .0038722    -3.60   0.000    -.0215477   -.0063687
       aged7 |  -.0178779   .0047627    -3.75   0.000    -.0272129    -.008543
       aged8 |   -.016735   .0071276    -2.35   0.019     -.030705    -.002765
       aged9 |  -.0243852   .0155726    -1.57   0.117    -.0549075    .0061371
      aged10 |  -.0161976   .0087502    -1.85   0.064     -.033348    .0009528
       _cons |    .012177   .0008617    14.13   0.000     .0104881    .0138659
-------------+----------------------------------------------------------------
         ijk |   absorbed                                 (2080034 categories)
(est2 stored)

. forvalues x=2(1)10{
  2.         lincom aged`x'
  3.         g beta_age_p_`x' = r(estimate)
  4.         g se_age_p_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0082172   .0013312    -6.17   0.000    -.0108263   -.0056081
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0113505   .0020913    -5.43   0.000    -.0154494   -.0072517
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0142459   .0024273    -5.87   0.000    -.0190034   -.0094884
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0135284   .0028723    -4.71   0.000    -.0191582   -.0078986
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0139582   .0038722    -3.60   0.000    -.0215477   -.0063687
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0178779   .0047627    -3.75   0.000    -.0272129    -.008543
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   -.016735   .0071276    -2.35   0.019     -.030705    -.002765
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0243852   .0155726    -1.57   0.117    -.0549075    .0061371
------------------------------------------------------------------------------

 ( 1)  aged10 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0161976   .0087502    -1.85   0.064     -.033348    .0009528
------------------------------------------------------------------------------

. forvalues x=1(1)1{
  2.         g beta_age_p_`x' = 0
  3.         g beta_age_q_`x' = 0
  4. }

. 
. keep if _n == 1
(7,075,376 observations deleted)

. 
. collapse (max) beta_age_* se_age_*, by(age_ele1)

. 
. g obs = 1

. reshape long beta_age_q_ beta_age_p_ se_age_q_ se_age_p_, i(obs) j(experience)
(note: j = 1 2 3 4 5 6 7 8 9 10)
(note: se_age_q_1 not found)
(note: se_age_p_1 not found)

Data                               wide   ->   long
-----------------------------------------------------------------------------
Number of obs.                        1   ->      10
Number of variables                  40   ->       7
j variable (10 values)                    ->   experience
xij variables:
beta_age_q_1 beta_age_q_2 ... beta_age_q_10->  beta_age_q_
beta_age_p_1 beta_age_p_2 ... beta_age_p_10->  beta_age_p_
  se_age_q_1 se_age_q_2 ... se_age_q_10   ->   se_age_q_
  se_age_p_1 se_age_p_2 ... se_age_p_10   ->   se_age_p_
-----------------------------------------------------------------------------

. drop age_ele1

. rename  beta_age_q_ beta_age_q

. rename  beta_age_p_  beta_age_p

. rename  se_age_q_   se_age_q

. rename  se_age_p_  se_age_p

. *
. g zero = 0

. local zero = 0 

. *
. global bandwidth = 0.66

. gen beta_bench = 0

. local beta_bench = beta_bench

. 
. g beta_age_q_min = beta_age_q-1.64*se_age_q
(1 missing value generated)

. g beta_age_q_max = beta_age_q+1.64*se_age_q
(1 missing value generated)

. g beta_age_p_min = beta_age_p-1.64*se_age_p
(1 missing value generated)

. g beta_age_p_max = beta_age_p+1.64*se_age_p
(1 missing value generated)

.                                 
. label define experience 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" 10 "10"

. label values experience experience

. label list
experience:
           2 2
           3 3
           4 4
           5 5
           6 6
           7 7
           8 8
           9 9
          10 10

. label var beta_age_q "quantities"

. label var beta_age_p "prices"

. *
. twoway scatter beta_age_q experience,  c(l) lpattern(dash) lwidth(thin) sort  xlabel(1 2 3 4 5 6 7 8 9 10,  valuelabel)  ylabel(-0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8) ///
> || scatter beta_age_p experience,  lwidth(thin) lpattern(solid) c(l) xtitle("# years since last entry")  ///
> || line beta_bench experience, color(gs5) ///
> legend(on order(1 2)) bgcolor(white) graphregion(color(white)) ysize(2) xsize(2) ysc(r(-0.2 0.68)) 

. graph export "$results\Figure_2b.eps", as(eps) replace
(note: file results\Figure_2b.eps not found)
(file results\Figure_2b.eps written in EPS format)

. 
. eststo clear

. 
. /// With FE & reconstructed years: Figure 2c
> 
. use "$Output\dataset_brv_fe_reconstr", clear

. tab age_ele1, gen(aged)

       Age$ |
   _{ijkt}$ |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |  2,449,103       39.30       39.30
          2 |    968,634       15.54       54.84
          3 |    785,088       12.60       67.44
          4 |    553,911        8.89       76.33
          5 |    407,470        6.54       82.87
          6 |    309,304        4.96       87.83
          7 |    236,884        3.80       91.63
          8 |    184,139        2.95       94.59
          9 |    143,144        2.30       96.88
         10 |    111,344        1.79       98.67
         11 |     82,823        1.33      100.00
------------+-----------------------------------
      Total |  6,231,844      100.00

. replace aged10 = 1 if age_ele1>=10
(962,510 real changes made)

. drop aged11

. tab year, gen(yeard)

       Year |      Freq.     Percent        Cum.
------------+-----------------------------------
       1996 |    689,343        9.69        9.69
       1997 |    755,574       10.62       20.32
       1998 |    773,410       10.88       31.19
       1999 |    789,051       11.10       42.29
       2000 |    813,596       11.44       53.73
       2001 |    814,532       11.45       65.18
       2002 |    824,643       11.60       76.78
       2003 |    815,042       11.46       88.24
       2004 |    836,340       11.76      100.00
------------+-----------------------------------
      Total |  7,111,531      100.00

. *
. global condition     "entry_ele!=1994 & entry_ele!=1995 "

. *
. eststo: areg res_fe_qty                 aged2-aged9     if $condition , a(ijk) cluster(i)

Linear regression, absorbing indicators         Number of obs     =  3,741,140
                                                F(   8,  72493)   =      37.60
                                                Prob > F          =     0.0000
                                                R-squared         =     0.7097
                                                Adj R-squared     =     0.4150
                                                Root MSE          =     0.9589

                                 (Std. Err. adjusted for 72,494 clusters in i)
------------------------------------------------------------------------------
             |               Robust
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |   .0251543   .0029375     8.56   0.000     .0193969    .0309117
       aged3 |   .0672188   .0045321    14.83   0.000     .0583359    .0761016
       aged4 |   .0872917   .0055805    15.64   0.000     .0763539    .0982296
       aged5 |   .0893091   .0074046    12.06   0.000      .074796    .1038222
       aged6 |   .0879418   .0094794     9.28   0.000     .0693621    .1065214
       aged7 |   .0870325   .0115923     7.51   0.000     .0643117    .1097533
       aged8 |   .0793243   .0143714     5.52   0.000     .0511564    .1074923
       aged9 |   .0802836   .0192948     4.16   0.000     .0424659    .1181012
       _cons |  -.1130558   .0017882   -63.22   0.000    -.1165606    -.109551
-------------+----------------------------------------------------------------
         ijk |   absorbed                                 (1884495 categories)
(est1 stored)

. forvalues x=2(1)9{
  2.         lincom aged`x'
  3.         g beta_age_q_`x' = r(estimate)
  4.         g se_age_q_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0251543   .0029375     8.56   0.000     .0193969    .0309117
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0672188   .0045321    14.83   0.000     .0583359    .0761016
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0872917   .0055805    15.64   0.000     .0763539    .0982296
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0893091   .0074046    12.06   0.000      .074796    .1038222
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0879418   .0094794     9.28   0.000     .0693621    .1065214
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0870325   .0115923     7.51   0.000     .0643117    .1097533
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0793243   .0143714     5.52   0.000     .0511564    .1074923
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .0802836   .0192948     4.16   0.000     .0424659    .1181012
------------------------------------------------------------------------------

. eststo: areg res_fe_uv_nojkt    aged2-aged9     if $condition  & e(sample), a(ijk) cluster(i)

Linear regression, absorbing indicators         Number of obs     =  3,741,140
                                                F(   8,  72493)   =       1.94
                                                Prob > F          =     0.0494
                                                R-squared         =     0.6913
                                                Adj R-squared     =     0.3780
                                                Root MSE          =     0.5364

                                 (Std. Err. adjusted for 72,494 clusters in i)
------------------------------------------------------------------------------
             |               Robust
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |  -.0015001   .0015554    -0.96   0.335    -.0045486    .0015484
       aged3 |  -.0064596   .0026521    -2.44   0.015    -.0116578   -.0012614
       aged4 |  -.0083613   .0025755    -3.25   0.001    -.0134093   -.0033133
       aged5 |  -.0094254   .0033466    -2.82   0.005    -.0159847   -.0028661
       aged6 |  -.0135198   .0041865    -3.23   0.001    -.0217253   -.0053143
       aged7 |  -.0137764   .0053693    -2.57   0.010    -.0243002   -.0032525
       aged8 |   -.015279   .0089459    -1.71   0.088    -.0328129    .0022549
       aged9 |  -.0120121   .0077225    -1.56   0.120    -.0271481    .0031239
       _cons |   .0101643   .0008789    11.57   0.000     .0084416    .0118869
-------------+----------------------------------------------------------------
         ijk |   absorbed                                 (1884495 categories)
(est2 stored)

. forvalues x=2(1)9{
  2.         lincom aged`x'
  3.         g beta_age_p_`x' = r(estimate)
  4.         g se_age_p_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0015001   .0015554    -0.96   0.335    -.0045486    .0015484
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0064596   .0026521    -2.44   0.015    -.0116578   -.0012614
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0083613   .0025755    -3.25   0.001    -.0134093   -.0033133
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0094254   .0033466    -2.82   0.005    -.0159847   -.0028661
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0135198   .0041865    -3.23   0.001    -.0217253   -.0053143
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0137764   .0053693    -2.57   0.010    -.0243002   -.0032525
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   -.015279   .0089459    -1.71   0.088    -.0328129    .0022549
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0120121   .0077225    -1.56   0.120    -.0271481    .0031239
------------------------------------------------------------------------------

. forvalues x=1(1)1{
  2.         g beta_age_p_`x' = 0
  3.         g beta_age_q_`x' = 0
  4. }

. 
. keep if _n == 1
(7,111,530 observations deleted)

. 
. collapse (max) beta_age_* se_age_*, by(age_ele1)

. 
. g obs = 1

. reshape long beta_age_q_ beta_age_p_ se_age_q_ se_age_p_, i(obs) j(experience)
(note: j = 1 2 3 4 5 6 7 8 9)
(note: se_age_q_1 not found)
(note: se_age_p_1 not found)

Data                               wide   ->   long
-----------------------------------------------------------------------------
Number of obs.                        1   ->       9
Number of variables                  36   ->       7
j variable (9 values)                     ->   experience
xij variables:
beta_age_q_1 beta_age_q_2 ... beta_age_q_9->   beta_age_q_
beta_age_p_1 beta_age_p_2 ... beta_age_p_9->   beta_age_p_
   se_age_q_1 se_age_q_2 ... se_age_q_9   ->   se_age_q_
   se_age_p_1 se_age_p_2 ... se_age_p_9   ->   se_age_p_
-----------------------------------------------------------------------------

. drop age_ele1

. rename  beta_age_q_ beta_age_q

. rename  beta_age_p_  beta_age_p

. rename  se_age_q_   se_age_q

. rename  se_age_p_  se_age_p

. *
. g zero = 0

. local zero = 0 

. *
. global bandwidth = 0.66

. gen beta_bench = 0

. local beta_bench = beta_bench

. 
. g beta_age_q_min = beta_age_q-1.64*se_age_q
(1 missing value generated)

. g beta_age_q_max = beta_age_q+1.64*se_age_q
(1 missing value generated)

. g beta_age_p_min = beta_age_p-1.64*se_age_p
(1 missing value generated)

. g beta_age_p_max = beta_age_p+1.64*se_age_p
(1 missing value generated)

.                                 
. label define experience 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" 

. label values experience experience

. label list
experience:
           2 2
           3 3
           4 4
           5 5
           6 6
           7 7
           8 8
           9 9

. label var beta_age_q "quantities"

. label var beta_age_p "prices"

. *
. twoway scatter beta_age_q experience,  c(l) lpattern(dash) lwidth(thin) sort  xlabel(1 2 3 4 5 6 7 8 9 ,  valuelabel)  ylabel(-0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8) ///
> || scatter beta_age_p experience,  lwidth(thin) lpattern(solid) c(l) xtitle("# years since last entry")  ///
> || line beta_bench experience, color(gs5) ///
> legend(on order(1 2)) bgcolor(white) graphregion(color(white)) ysize(2) xsize(2) ysc(r(-0.2 0.68)) 

. graph export "$results\Figure_2c.eps", as(eps) replace
(note: file results\Figure_2c.eps not found)
(file results\Figure_2c.eps written in EPS format)

. 
. eststo clear

. 
. /// survivors 10 years: Figure A.5 (web appendix)
> 
. use "$Output\dataset_brv_fe", clear

. tab age_ele1, gen(aged)

       Age$ |
   _{ijkt}$ |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |  2,735,188       38.66       38.66
          2 |  1,128,474       15.95       54.61
          3 |    872,423       12.33       66.94
          4 |    613,930        8.68       75.61
          5 |    448,352        6.34       81.95
          6 |    340,770        4.82       86.77
          7 |    263,962        3.73       90.50
          8 |    204,436        2.89       93.39
          9 |    161,307        2.28       95.67
         10 |    127,147        1.80       97.46
         11 |    100,840        1.43       98.89
         12 |     78,548        1.11      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. replace aged10 = 1 if age_ele1>=10
(179,388 real changes made)

. drop aged11

. tab year, gen(yeard)

       Year |      Freq.     Percent        Cum.
------------+-----------------------------------
       1996 |    578,661        8.18        8.18
       1997 |    657,228        9.29       17.47
       1998 |    682,850        9.65       27.12
       1999 |    699,799        9.89       37.01
       2000 |    727,678       10.28       47.29
       2001 |    732,521       10.35       57.65
       2002 |    743,846       10.51       68.16
       2003 |    732,782       10.36       78.52
       2004 |    754,590       10.67       89.18
       2005 |    765,422       10.82      100.00
------------+-----------------------------------
      Total |  7,075,377      100.00

. *
. global condition     "entry_ele!=1994 & entry_ele!=1995 "

. *
. eststo: reg res_fe_qty                  aged2-aged10     if $condition & age_ele1_max==10, ro cluster(i)

Linear regression                               Number of obs     =    121,775
                                                F(9, 4745)        =      97.79
                                                Prob > F          =     0.0000
                                                R-squared         =     0.0175
                                                Root MSE          =     1.2656

                                  (Std. Err. adjusted for 4,746 clusters in i)
------------------------------------------------------------------------------
             |               Robust
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |   .3167724   .0151888    20.86   0.000     .2869953    .3465495
       aged3 |   .4465724   .0178608    25.00   0.000     .4115569    .4815878
       aged4 |   .5107546   .0186335    27.41   0.000     .4742243    .5472848
       aged5 |   .5628556   .0213193    26.40   0.000     .5210598    .6046514
       aged6 |    .594189   .0232849    25.52   0.000     .5485397    .6398383
       aged7 |   .5949204   .0224326    26.52   0.000     .5509421    .6388986
       aged8 |   .5705131   .0216343    26.37   0.000     .5280998    .6129264
       aged9 |   .5633905   .0217626    25.89   0.000     .5207257    .6060553
      aged10 |   .4957708   .0212573    23.32   0.000     .4540966    .5374451
       _cons |   -.114645   .0189659    -6.04   0.000    -.1518269   -.0774631
------------------------------------------------------------------------------
(est1 stored)

. forvalues x=2(1)10{
  2.         lincom aged`x'
  3.         g beta_age_q_`x' = r(estimate)
  4.         g se_age_q_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .3167724   .0151888    20.86   0.000     .2869953    .3465495
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .4465724   .0178608    25.00   0.000     .4115569    .4815878
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5107546   .0186335    27.41   0.000     .4742243    .5472848
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5628556   .0213193    26.40   0.000     .5210598    .6046514
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |    .594189   .0232849    25.52   0.000     .5485397    .6398383
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5949204   .0224326    26.52   0.000     .5509421    .6388986
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5705131   .0216343    26.37   0.000     .5280998    .6129264
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .5633905   .0217626    25.89   0.000     .5207257    .6060553
------------------------------------------------------------------------------

 ( 1)  aged10 = 0

------------------------------------------------------------------------------
  res_fe_qty |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   .4957708   .0212573    23.32   0.000     .4540966    .5374451
------------------------------------------------------------------------------

. eststo: reg res_fe_uv_nojkt     aged2-aged10     if $condition  & e(sample) & age_ele1_max==10, ro cluster(i)

Linear regression                               Number of obs     =    121,775
                                                F(9, 4745)        =       1.90
                                                Prob > F          =     0.0475
                                                R-squared         =     0.0007
                                                Root MSE          =     .52825

                                  (Std. Err. adjusted for 4,746 clusters in i)
------------------------------------------------------------------------------
             |               Robust
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
       aged2 |   -.038194   .0140731    -2.71   0.007    -.0657838   -.0106043
       aged3 |   -.046674   .0140526    -3.32   0.001    -.0742236   -.0191245
       aged4 |  -.0416305   .0144851    -2.87   0.004    -.0700279    -.013233
       aged5 |   -.046571   .0152291    -3.06   0.002    -.0764272   -.0167149
       aged6 |    -.05387   .0153159    -3.52   0.000    -.0838963   -.0238437
       aged7 |  -.0496079   .0151798    -3.27   0.001    -.0793673   -.0198485
       aged8 |  -.0485493   .0150817    -3.22   0.001    -.0781164   -.0189821
       aged9 |  -.0434527   .0149579    -2.91   0.004    -.0727771   -.0141283
      aged10 |  -.0469877   .0152837    -3.07   0.002    -.0769508   -.0170246
       _cons |   .0027579   .0147359     0.19   0.852    -.0261312    .0316471
------------------------------------------------------------------------------
(est2 stored)

. forvalues x=2(1)10{
  2.         lincom aged`x'
  3.         g beta_age_p_`x' = r(estimate)
  4.         g se_age_p_`x'   = r(se) 
  5. }

 ( 1)  aged2 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   -.038194   .0140731    -2.71   0.007    -.0657838   -.0106043
------------------------------------------------------------------------------

 ( 1)  aged3 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   -.046674   .0140526    -3.32   0.001    -.0742236   -.0191245
------------------------------------------------------------------------------

 ( 1)  aged4 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0416305   .0144851    -2.87   0.004    -.0700279    -.013233
------------------------------------------------------------------------------

 ( 1)  aged5 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |   -.046571   .0152291    -3.06   0.002    -.0764272   -.0167149
------------------------------------------------------------------------------

 ( 1)  aged6 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |    -.05387   .0153159    -3.52   0.000    -.0838963   -.0238437
------------------------------------------------------------------------------

 ( 1)  aged7 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0496079   .0151798    -3.27   0.001    -.0793673   -.0198485
------------------------------------------------------------------------------

 ( 1)  aged8 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0485493   .0150817    -3.22   0.001    -.0781164   -.0189821
------------------------------------------------------------------------------

 ( 1)  aged9 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0434527   .0149579    -2.91   0.004    -.0727771   -.0141283
------------------------------------------------------------------------------

 ( 1)  aged10 = 0

------------------------------------------------------------------------------
res_fe_uv_~t |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         (1) |  -.0469877   .0152837    -3.07   0.002    -.0769508   -.0170246
------------------------------------------------------------------------------

. forvalues x=1(1)1{
  2.         g beta_age_p_`x' = 0
  3.         g beta_age_q_`x' = 0
  4.         g se_age_p_`x'   = 0
  5.         g se_age_q_`x'   = 0 
  6. }

. 
. keep if _n == 1
(7,075,376 observations deleted)

. 
. collapse (max) beta_age_* se_age_*, by(age_ele1)

. 
. g obs = 1

. reshape long beta_age_q_ beta_age_p_ se_age_q_ se_age_p_, i(obs) j(experience)
(note: j = 1 2 3 4 5 6 7 8 9 10)

Data                               wide   ->   long
-----------------------------------------------------------------------------
Number of obs.                        1   ->      10
Number of variables                  42   ->       7
j variable (10 values)                    ->   experience
xij variables:
beta_age_q_1 beta_age_q_2 ... beta_age_q_10->  beta_age_q_
beta_age_p_1 beta_age_p_2 ... beta_age_p_10->  beta_age_p_
  se_age_q_1 se_age_q_2 ... se_age_q_10   ->   se_age_q_
  se_age_p_1 se_age_p_2 ... se_age_p_10   ->   se_age_p_
-----------------------------------------------------------------------------

. drop age_ele1

. rename  beta_age_q_ beta_age_q

. rename  beta_age_p_  beta_age_p

. rename  se_age_q_   se_age_q

. rename  se_age_p_  se_age_p

. *
. g zero = 0

. local zero = 0 

. *
. global bandwidth = 0.66

. gen beta_bench = 0

. local beta_bench = beta_bench

. 
. g beta_age_q_min = beta_age_q-1.96*se_age_q

. g beta_age_q_max = beta_age_q+1.96*se_age_q

. g beta_age_p_min = beta_age_p-1.96*se_age_p

. g beta_age_p_max = beta_age_p+1.96*se_age_p

.                                 
. label define experience 2 "2" 3 "3" 4 "4" 5 "5" 6 "6" 7 "7" 8 "8" 9 "9" 10 "10"

. label values experience experience

. label list
experience:
           2 2
           3 3
           4 4
           5 5
           6 6
           7 7
           8 8
           9 9
          10 10

. label var beta_age_q "quantities"

. label var beta_age_p "prices"

. *
. twoway scatter beta_age_q experience,  lwidth(thin) c(l) lpattern(dash) sort  xlabel(1 2 3 4 5 6 7 8 9 10,  valuelabel) ylabel(-0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8)  ///
> || scatter beta_age_p experience,   lwidth(thin) lpattern(solid) c(l) xtitle("# years since last entry") ///
> || line beta_bench experience, color(gs5) ///
> legend(on order(1 2)) bgcolor(white) graphregion(color(white)) ysize(2) xsize(2) ysc(r(-0.2 0.8))

. graph export "$results\Figure_A5.eps", as(eps) replace
(note: file results\Figure_A5.eps not found)
(file results\Figure_A5.eps written in EPS format)

. 
. log close
      name:  <unnamed>
       log:  D:\Vicard\VV\re\inprogress\BRV\results\Figure2.log
  log type:  text
 closed on:  29 Sep 2017, 18:11:53
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
